//
//  Tweet.h
//  TuiTe
//
//  Created by 张 霄鹤 on 10-3-12.
//  Copyright 2010 xhzhang. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Node.h"
#import "Element.h"
#import "User.h"

@class User;

@interface Tweet : NSManagedObject {
	NSString *created_at;
	NSString *tid;
	NSString *text;
	NSString *source;
	NSNumber *truncated;
	NSNumber *favorited;
	NSNumber *unreaded;
	User *usr;
}

@property(nonatomic, retain) NSString *created_at;
@property(nonatomic, retain) NSString *tid;
@property(nonatomic, retain) NSString *text;
@property(nonatomic, retain) NSString *source;
@property(nonatomic, retain) NSNumber *truncated;
@property(nonatomic, retain) NSNumber *favorited;
@property(nonatomic, retain) NSNumber *unreaded;
@property(nonatomic, retain) User *usr;

- (void)parse:(Element *)el;

- (NSString *)created_at;
- (void)setCreated_at:(NSString *)value;
- (BOOL)validateCreated_at:(id *)valueRef error:(NSError **)outError;

- (NSNumber *)favorited;
- (void)setFavorited:(NSNumber *)value;
- (BOOL)validateFavorited:(id *)valueRef error:(NSError **)outError;

- (NSString *)source;
- (void)setSource:(NSString *)value;
- (BOOL)validateSource:(id *)valueRef error:(NSError **)outError;

- (NSString *)text;
- (void)setText:(NSString *)value;
- (BOOL)validateText:(id *)valueRef error:(NSError **)outError;

- (NSString *)tid;
- (void)setTid:(NSString *)value;
- (BOOL)validateTid:(id *)valueRef error:(NSError **)outError;

- (NSNumber *)truncated;
- (void)setTruncated:(NSNumber *)value;
- (BOOL)validateTruncated:(id *)valueRef error:(NSError **)outError;

- (User *)usr;
- (void)setUsr:(User *)value;
- (BOOL)validateUsr:(id *)valueRef error:(NSError **)outError;

- (NSNumber *)unreaded;
- (void)setUnreaded:(NSNumber *)value;
- (BOOL)validateUnreaded:(id *)valueRef error:(NSError **)outError;

@end
